import { $t } from "@/plugins/i18n";
const Layout = () => import("@/layout/index.vue");
import iconkc from '@/assets/svg/kc.svg?component'
import kc_order from '@/assets/svg/kc_order.svg?component'
import kc_yx from '@/assets/svg/kc_yx.svg?component'
import kepu from '@/assets/svg/kepu.svg?component'
import zhishi from '@/assets/svg/zhishi.svg?component'
import student from '@/assets/svg/student.svg?component'
import student_query from '@/assets/svg/student_query.svg?component'
import system from '@/assets/svg/system.svg?component'
import Feedback from '@/assets/svg/Feedback.svg?component'
import operate from '@/assets/svg/operate.svg?component'
import question from '@/assets/svg/question.svg?component'
import account from '@/assets/svg/account.svg?component'
import account_yy from '@/assets/svg/account_yy.svg?component'
import role from '@/assets/svg/role.svg?component'

export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: '登录',
      showLink: false,
      rank: 2
    }
  },
  {
    path: "/redirect",
    component: Layout,
    meta: {
      icon: "homeFilled",
      title: $t("menus.hshome"),
      showLink: false,
      rank: 3
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  },
  {
    path: "/courseManagement",
    name: "courseManagement",
    component: Layout,
    redirect: "/courseManagement/OrderManagement",
    meta: {
      icon: iconkc,
      title: '课程管理',
      rank: 4
    },
    children: [
      {
        path: "/courseManagement/OrderManagement",
        name: "courseManagementOrderManagement",
        component: () => import("@/views/courseManagement/OrderManagement.vue"),
        meta: {
          title:'购课订单管理',
           icon: kc_order,
        }
      },
      {
        path: "/courseManagement/GraduateManagement",
        name: "courseManagementGraduateManagement",
        component: () => import("@/views/courseManagement/GraduateManagement.vue"),
        meta: {
          title: '研学课程管理',
          icon: kc_yx,
        }
      },
      
    ]
  },
  {
    path: "/PopularManagement",
    name: "PopularManagement",
    component: Layout,
    redirect: "/PopularManagement/popular",
    meta: {
      icon: kepu,
      title: '科普研学',
      rank: 4
    },
    children: [
      {
        path: "/PopularManagement/popular",
        name: "PopularManagementpopular",
        component: () => import("@/views/PopularManagement/popular.vue"),
        meta: {
          title:'科普研学',
           icon: kepu,
        }
      },
    ]
  },
  {
    path: "/knowledgeManagement",
    name: "knowledgeManagement",
    component: Layout,
    redirect: "/knowledgeManagement/knowledge",
    meta: {
      icon: zhishi,
      title: '科普知识',
      rank: 4
    },
    children: [
      {
        path: "/knowledgeManagement/knowledge",
        name: "knowledgeManagementknowledge",
        component: () => import("@/views/knowledgeManagement/knowledge.vue"),
        meta: {
          title:'科普知识',
           icon: zhishi,
        }
      },
    ]
  },
  {
    path: "/UserManagement",
    name: "UserManagement",
    component: Layout,
    redirect: "/UserManagement/student",
    meta: {
      icon: student,
      title: '用户管理',
      rank: 4
    },
    children: [
      {
        path: "/UserManagement/student",
        name: "student",
        component: () => import("@/views/UserManagement/student.vue"),
        meta: {
          title:'用户管理',
           icon: student,
        }
      },
    ]
  },
  {
    path: "/StudentManagement",
    name: "StudentManagement",
    component: Layout,
    redirect: "/StudentManagement/student",
    meta: {
      icon: student_query,
      title: '学员管理',
      rank: 4
    },
    children: [
      {
        path: "/StudentManagement/student",
        name: "StudentManagement/Student",
        component: () => import("@/views/StudentManagement/student.vue"),
        meta: {
          title:'学员管理',
           icon: student_query,
        }
      },
    ]
  },
  {
    path: "/systemManagement",
    name: "systemManagement",
    component: Layout,
    redirect: "/systemManagement/Feedback",
    meta: {
      icon: system,
      title: '系统管理',
      rank: 4
    },
    children: [
      {
        path: "/systemManagement/Feedback",
        name: "/systemManagement/Feedback",
        component: () => import("@/views/systemManagement/Feedback.vue"),
        meta: {
          title:'系统反馈',
           icon: Feedback,
        }
      },
      {
        path: "/systemManagement/question",
        name: "/systemManagement/question",
        component: () => import("@/views/systemManagement/question.vue"),
        meta: {
          title:'常见问题',
           icon: question,
        }
      },
      {
        path: "/systemManagement/operate",
        name: "/systemManagement/operate",
        component: () => import("@/views/systemManagement/operate.vue"),
        meta: {
          title:'操作指南',
           icon: operate,
        }
      },
    ]
  },
  {
    path: "/accountManagement",
    name: "accountManagement",
    component: Layout,
    redirect: "/accountManagement/operate",
    meta: {
      icon: account,
      title: '账号管理',
      rank: 4
    },
    children: [
      {
        path: "/accountManagement/operate",
        name: "/accountManagement/operate",
        component: () => import("@/views/accountManagement/operate.vue"),
        meta: {
          title:'运营账号管理',
           icon: account_yy,
        }
      },
      {
        path: "/accountManagement/role",
        name: "/accountManagement/role",
        component: () => import("@/views/accountManagement/role.vue"),
        meta: {
          title:'角色权限管理',
           icon: role,
        }
      },
    ]
  }
  
  

] as Array<RouteConfigsTable>;
